﻿@{
    ViewBag.Title = "MoveHouse";
    Layout = "~/Views/Shared/Template.cshtml";
}

@using Partner.MVC.Models;
@{
    var user = Session["LoginUser"] as User_Info;
}

<style>
    #divLeft {
        width: 24%;
    }

    #divContent {
        width: 75%;
    }
</style>

<div style="height: 300px;width: 100%;background:url(/static/hbweb/images/me.jpg);">
    <div class="container">
        <div class="header-message">
            <img class="fl" src="http://pic.huobanchina.com/o_1bp7omfg8e821pc4bbg1u8g1ifl9.jpeg" alt="" />
            <div class="fl header-text">
                <h3 class="user-name">@user.Use_Name </h3>
                <i class="icon-fabu3 point user-namei"></i>
            </div>
            <a id="AlterPwd" style="width:85px;" data-toggle="modal" data-target="#myModal" class="fr fn-font-hover-blue change change-password">
                修改密码
            </a>
        </div>

    </div>
</div>

<div class="bgcSil">
    <div class="container">
        <div class="mt30" style="width: 100%">
            <ul id="divLeft" class="nav navbar-nav"></ul>
            <div id="divContent" class="fr mb80 cont bgcWhit news-list-con">
                <div class="news-list-con bgcWhit">
                    <div id="myTabContent" class="tab-content">
                        <div class="tab-pane fade in active" id="home">
                            <div class="news-list-info clearfix">
                                <ul class="myhome will-delete">
                                    @foreach (var a in Model)
                                    {
                                        <li hoseid="" class="fcBlack">
                                            <a class="fl" href="#" target="_blank">
                                                <img src="http://47.93.33.136:8080/userfiles/1/images/adminReleaseRoom/img/2017/08/fangjian.jpg" alt="@a.Item1" />
                                            </a>
                                            <div class="news-note">
                                                <div class="fl">
                                                    <h3>
                                                        <a class="fcBlack" href="#" target="_blank">@a.Item5 - @a.Item6</a>
                                                    </h3>
                                                    <p>公司名称 ： @a.Item4</p>
                                                    <br />
                                                </div>
                                                <div class=" fr">
                                                    <p>单价<span style="color: red;font-size: 30px">@a.Item3</span>元/次</p>
                                                    <p>购买数量<span style="color: red;font-size: 30px">@a.Item2</span>个</p>
                                                </div>
                                            </div>
                                        </li>
                                    }
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 左侧导航-->
<script>
    ParentNav();
    // 绑定根节点
    function ParentNav() {
        $.ajax({
            type: "post",
            url: "/Partner/LeftNav",
            dataType: "json",
            success: function (data) {
                var htmltab = "";
                for (var i = 0; i < data.length; i++) {
                    htmltab += "<li class=\"dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" style=\"width: 175px;font-size: 16px;\">" + data[i].Lar_Name + "</a>" + SonNav(data[i].Limit_Id) + "</li>";
                }
                $("#divLeft").append(htmltab);
            },
            error: function (err) {
                alert(err);
            }
        })
    }
    // 绑定子节点
    function SonNav(id) {
        var html1 = "";
        $.ajax({
            type: "post",
            url: "/Partner/LeftSon",
            data: { pid: id },
            dataType: "json",
            async: false,
            success: function (data) {
                var strhtml = "<ul class=\"dropdown-menu\">"
                for (var i = 0; i < data.length; i++) {
                    strhtml += "<li><a href=\"" + data[i].Limit_Url + "\">" + data[i].Limit_Name + "</a></li>"
                }
                strhtml += "</ul>";
                html1 = strhtml;
            }
        })
        return html1;
    }
</script>


